# -*- coding: utf-8 -*-
from setuptools import setup


def read_version(path):
    with open(path, 'rt') as f:
        for line in f:
            if line.startswith('__version__'):
                return line.split("'")[1]
        raise IOError

version = read_version('go2rpm/__init__.py')

ARGS = dict(
    name="go2rpm",
    version=version,
    description="Convert Go packages to RPM",
    license="MIT",
    keywords="go golang rpm",

    packages=["go2rpm"],
    package_data={
        "go2rpm": [
            "spdx_to_fedora.csv",
            "templates/*.spec",
            "templates/*.spec.inc",
        ],
    },
    entry_points={
        "console_scripts": [
            "go2rpm = go2rpm.__main__:main"
        ],
    },
    install_requires=[
        # CLI tool
        "aiohttp",
        "gitpython",
        "jinja2"
    ],

    author="Robert-André Mauchin",
    author_email="zebob.m@gmail.com",
    url="https://pagure.io/GoSIG/go2rpm",
    classifiers=[
        "Development Status :: 5 - Production/Stable",
        "Intended Audience :: Developers",
        "License :: OSI Approved :: MIT License",
        "Operating System :: POSIX :: Linux",
        "Programming Language :: Python :: 3 :: Only",
        "Programming Language :: Python :: 3.6",
        "Programming Language :: Python :: 3.7",
        "Programming Language :: Python :: 3.8",
        "Topic :: Software Development :: Build Tools",
        "Topic :: System :: Software Distribution",
        "Topic :: Utilities",
    ],
)

if __name__ == "__main__":
    setup(**ARGS)
